package com.qf.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 高圆圆
 * @date 2023/6/2 11:02
 */

@Data//setXXX()/getXXX()/toString() equals and hashcode()
@NoArgsConstructor //提供无参构造方法
@AllArgsConstructor //提供了全参构造方法
public class Product {
    /**
     * pid  varchar(32) NOT NULL
     * pname    varchar(50) NULL
     * market_price double NULL
     * shop_price   double NULL
     * pimage   varchar(200) NULL
     * pdate    date NULL
     * is_hot   int(11) NULL
     * pdesc    varchar(255) NULL
     * pflag    int(11) NULL
     * cid  varchar(32) NULL  //属于那个分类信息
     */
    private  String pid ; //商品id
    private String pname ; //商品名称
    private double market_price ;//市场价格
    private double shop_price ; //商城价格
    private String pimage ;   // 商品图片地址
    private Date   pdate ;    // 商品上架日期
    private int   is_hot  ;   //是否热门 0非热门,1,热门
    private String pdesc  ;   //商品描述
    private  int  pflag   ;   //商品是否下架  0,未下架(默认值),1下架
    private Category category ;//这个商品属于哪个分类实体的


   /* public Product() {
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public double getMarket_price() {
        return market_price;
    }

    public void setMarket_price(double market_price) {
        this.market_price = market_price;
    }

    public double getShop_price() {
        return shop_price;
    }

    public void setShop_price(double shop_price) {
        this.shop_price = shop_price;
    }

    public String getPimage() {
        return pimage;
    }

    public void setPimage(String pimage) {
        this.pimage = pimage;
    }

    public Date getPdate() {
        return pdate;
    }

    public void setPdate(Date pdate) {
        this.pdate = pdate;
    }

    public int getIs_hot() {
        return is_hot;
    }

    public void setIs_hot(int is_hot) {
        this.is_hot = is_hot;
    }

    public String getPdesc() {
        return pdesc;
    }

    public void setPdesc(String pdesc) {
        this.pdesc = pdesc;
    }

    public int getPflag() {
        return pflag;
    }

    public void setPflag(int pflag) {
        this.pflag = pflag;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }*/
   public static void main(String[] args) {
       Product product = new Product() ;
       product.setPid("1");
       product.setPname("小米p10");
       product.setPdate(new Date());
       product.setShop_price(999.00);
       System.out.println(product);
   }
}
